﻿Imports WeifenLuo.WinFormsUI.Docking

Public Class RSSByNameForm
  Inherits DockContent

  Private _dw() As DownloadabeWallpaper

  Private Sub RSSByNameForm_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

  End Sub

  Private Sub LoadForm()
    For i As Integer = 0 To _dw.Length - 1 Step 1
      Dim rssbnf As New RSSElementPanel(_dw(i))
      rssbnf.BorderStyle = BorderStyle.FixedSingle 
      rssbnf.Height = rssbnf.Height + 3
      rssbnf.Width = Me.FlowLayoutPanel1.Width - 10
      Me.FlowLayoutPanel1.Controls.Add(rssbnf)
    Next
    Refresh()
  End Sub

  Public Property DownloadabeWallpapers() As DownloadabeWallpaper()
    Get
      Return _dw
    End Get
    Set(ByVal value() As DownloadabeWallpaper)
      _dw = value
      If _dw.Length > 0 Then
        Me.TabText = Utils.InitCap(_dw(0).Name) & " RSS [" & Configuration.GetObject.Resolution & "]"
      End If
      LoadForm()
    End Set
  End Property
End Class